﻿<Window x:Class="KeyTimer.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:local="clr-namespace:KeyTimer"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        Title="Key Timer"
        Width="525"
        Height="350"
        mc:Ignorable="d" Icon="icon.ico">
    <Window.DataContext>
        <local:Viewmodel />
    </Window.DataContext>
    <Grid>
        <ScrollViewer>

            <ItemsControl HorizontalAlignment="Left"
                          VerticalAlignment="Top"
                          ItemsSource="{Binding Keys}"
                          RenderTransformOrigin="0.5,0.5">
                <ItemsControl.RenderTransform>
                    <ScaleTransform ScaleY="-1" />
                </ItemsControl.RenderTransform>

                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <TextBlock RenderTransformOrigin="0.5,0.5">
                            <TextBlock.RenderTransform>
                                <ScaleTransform ScaleY="-1" />
                            </TextBlock.RenderTransform><Run Text="{Binding Key, Mode=OneTime}" /><Run Text=": " /> <Run Text="{Binding Time, Mode=OneTime}" />
                        </TextBlock>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>


        </ScrollViewer>
    </Grid>
</Window>
